<template>
	<view class="main">
		<view class="card-head dis-row">
			<view class="let-ico head-hei" @click="navBack"><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/left-jiantou.svg"></image></view>
			<view class="cen-title head-hei">修改</view>
			<view class="rig-share head-hei">分享</view>
		</view>
		<view class="card-info">
			<!--list start-->
			<view class="master-item">
				<view class="master-faceItem poser dis-row" @click="contactsNav">
					<!--头像处理start-->
					<view class="faceItem-ico">
						<image :src="myCard.avatar"></image>
					</view>
					<!--头像处理over-->
					<!--顶部右侧标题文字开始-->
					<view class="faceText dis-clm">
						<!--置顶信息start-->
						<view class="faceText-t1 dis-row">
							<view class="master-name">{{myCard.realName}}</view>
							<text>{{myCard.mobile}}</text>
						</view>
						<!--置顶信息over-->
						<view class="master-userinfo dis-row">
							<block v-if="!myCard.nickName">个人基本信息待完善</block>
							<block v-if="myCard.nickName">
								<text>{{myCard.gender==1?'男':'女'}}</text>
								<text v-if="myCard.age">{{myCard.age}}岁</text>
								<text v-if="myCard.realName">{{myCard.realName}}</text>
							</block>
						</view>
					</view>
					<!--顶部右侧标题文字结束-->
					<!--是否在线开始-->
					<view class="card-titlleico dis-row" @click="navigator('./EditUserInfo')">
						<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-edit.svg"></image></label>
						<text>{{myCard.realName?'修改':'完善'}}</text>
					</view>
					<!--是否在线结束-->
				</view>
				<!--标签列表开始-->
				<view class="contacts-gouceng dis-row" @click="contactsNav">
					<label>人员构成</label><text>{{myCard.staffTypeStr}}<block v-if="myCard.peopleNumStr">({{myCard.peopleNumStr}}人)</block></text>
					<label>工龄</label><text>{{myCard.workYear?myCard.workYear+'年':'未填'}}</text>
					<label>熟练度</label><text>{{myCard.masteryStr}}</text>
				</view>
			</view>
			<!--list over-->
			<view class="card-childName poser">
				自我介绍
				<view class="child-titlleico dis-row" @click="navigator('./introduce')">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-edit.svg"></image></label>
					<text>修改</text>
				</view>
			</view>
			<view class="card-personper">{{myCard.notice}}</view>
			<view class="card-childName poser">
				找活信息
				<view class="child-titlleico dis-row" @click="navigator('./findJob')">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-edit.svg"></image></label>
					<text>修改</text>
				</view>
			</view>
			<view class="child-classInfo dis-clm">
				<view class="t-text dis-row">
					<label>工种</label><text>{{myCard.skills}}</text>
				</view>
				<view class="t-text dis-row">
					<label>期望地点</label><text>{{myCard.hopeAddr}}</text>
				</view>
				<view class="t-text dis-row">
					<label>长短工</label><text>{{myCard.notice}}</text>
				</view>
				<view class="t-text dis-row">
					<label>结算方式</label><text>{{myCard.settlementStr}} / {{myCard.salary}}{{myCard.salaryUnitStr}}</text>
				</view>
				<view class="t-text dis-row">
					<label>找活状态</label>
					<text v-if="myCard.status==0">找活中</text>
					<text v-if="myCard.status==1">暂不找活</text>
					<text v-if="myCard.status==2">有活预定下一个</text>
				</view>
			</view>
			<view class="card-childName poser">
				找活视频
			</view>
			<view class="t-video">
				<image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/my/1.jpg"></image>
			</view>
			
			<view class="card-childName poser">
				项目经验
				<view class="child-titlleico dis-row" @click="navigator('./experience')">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-add.svg"></image></label>
					<text>添加</text>
				</view>
			</view>
			<view class="card-xiangmujingli" v-for="(item,index) in myCard.productHistoryList">
				<view class="card-childName poser">
					{{item.enterpriseName}}
					<view class="child-titlleico dis-row" @click="navigator('./experience?id='+item.id)">
						<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-edit.svg"></image></label>
						<text>修改</text>
					</view>
				</view>
				<view class="card-xmtext">{{item.startTime}}-{{item.endTime}}</view>
				<view class="card-jingliInfo">
					{{item.remark}}
				</view>
			</view>
			<view class="card-childName poser">
				技能证书
				<view class="child-titlleico dis-row" @click="navigator('./certificate')">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-add.svg"></image></label>
					<text>添加</text>
				</view>
			</view>
			<view class="contacts-zhengshu dis-row" v-for="(item,index) in myCard.certificateInfoList">
				<image :src="item.imgUrl"></image>
				<view class="zhengshu-text dis-clm">
					<label class="child-label">{{item.cName}}</label>
					<view class="dis-row">
						<label>获得证书时间</label><text>{{item.issueDate}}</text>
					</view>
				</view>
				<view class="certEdit" @click="navigator('./certificate?id='+item.id)">
					<label><image src="http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/contacts/card-edit.svg"></image></label>
					<text>修改</text>
				</view>
			</view>
		</view>
		<!--11-->
		<!--找活期望结束-->
		<view class="constacts-footer">
			<view>置顶发布</view>
			<view>发布名片</view>
		</view>
	</view>
</template>

<script>
import pop from "@/components/ming-pop/ming-blow.vue"
import Index from "@/common/index-model.js"
let index = new Index()
let that = null	
export default {
	data() {
		return {
			myCard:{}
		}
	},
	onLoad() {
		
	},
	onShow() {
		this.getCardDetail();
	},
	methods: {
		navBack() {
			index.navigate_back(1)
		},
		getCardDetail(){
			index.getPublicUserMember({},'/client/card/detail','get',res=>{
				if(res.data.code == 200 && res.data.success){
					let data=res.data.result;
					if(!data.avatar){
						data.avatar='http://xgr.oss-cn-hangzhou.aliyuncs.com/icon/images/default-avatar.png';
					}
					this.myCard=data;
					console.log(data);
				}
			})
			
		},
		navigator(url){
			index.navigate_to(url);
		},
		navBack() {
			index.navigate_back(1)
		},
	}
}
</script>

<style>
@import url("@/static/css/publics.css");
@import url("@/static/css/Mybusinesscardp.css");
</style>